package com.sxsy.datasource.controller;

import com.sxsy.datasource.util.WsjcFileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

import java.io.IOException;
@EnableScheduling
@Controller
public class WsjcFileController {
    @Autowired
    private WsjcFileUtil wsjcFileUtil;
    //10秒
    //@Scheduled(cron="0 0/1 * * * ?")//每隔一分钟执行一次 》
     @Scheduled(cron="0/4 * * * * ?") // 每隔4秒钟执行一次任务
    public void Dataupdate(){

         try{
             wsjcFileUtil.DEVfileAnalysis();
             wsjcFileUtil.BJfileAnalysis();
         }catch (Exception e){
             return;
         }


    }
}
